package ide;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import edu.umd.cs.piccolo.PCanvas;
import edu.umd.cs.piccolo.nodes.PPath;

public class Piccolo2DCanvas extends PCanvas implements MouseListener{
	private static final long serialVersionUID = 3121101539289960342L;

	public Piccolo2DCanvas()
	{
		super();
		this.addMouseListener(this);
	}

	@Override
	public void mouseClicked(MouseEvent e) {
		int x = e.getX();
		int y = e.getY();
		
		PPath box = PPath.createRectangle(x, y, 100, 100);
		this.getLayer().addChild(box);
	}

	@Override
	public void mouseEntered(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseExited(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mousePressed(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseReleased(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}
}
